import request from '../libs/request'

// 获取IP方数据 多条件
export const getIperList = (data) => {
    return request({
        url: `/iper/getByCondition`,
        data,
        method: 'get'
    })
}
// 根据企业名称搜索IP方
export const searchIper = (data) => {
    return request({
        url: `/iper/search`,
        data,
        method: 'get'
    })
}
// 添加IP方
export const addIper = (data) => {
    return request({
        url: ``,
        data,
        method: 'post'
    })
}
// 编辑IP方
export const editIper = (data) => {
    return request({
        url: ``,
        data,
        method: 'post'
    })
}
// 删除IP方
export const deleteIper = (ids, data) => {
    return request({
        url: `/iper/delByIds/${ids}`,
        data,
        method: 'delete'
    })
}
// 获取IP方数据 待审核
export const getIperWaitList = (data) => {
    return request({
        url: `/iper/getWaitList`,
        data,
        method: 'get'
    })
}
// 审批IP方
export const auditIper = (ids, data) => {
    return request({
        url: `/iper/auditByIds/${ids}`,
        data,
        method: 'post'
    })
}
//根据id获取IP方
export const getIperById = (id, data) => {
    return request({
        url: `/iper/get/${id}`,
        data,
        method: 'get'
    })
}

// 推送首页
export const pushHomeIper = (ids, data) => {
    return request({
        url: `/iper/pushHome/${ids}`,
        data,
        method: 'post'
    })
}
// 取消推送首页
export const unPushHomeIper = (ids, data) => {
    return request({
        url: `/iper/unPushHome/${ids}`,
        data,
        method: 'post'
    })
}

// 推荐
export const recommendIper = (ids, data) => {
    return request({
        url: `/iper/recommend/${ids}`,
        data,
        method: 'post'
    })
}
// 取消推荐
export const unRecommendIper = (ids, data) => {
    return request({
        url: `/iper/unRecommend/${ids}`,
        data,
        method: 'post'
    })
}
// 设置CLE展商
export const cleExhibitorIper = (ids, data) => {
    return request({
        url: `/iper/exhibitor/${ids}`,
        data,
        method: 'post'
    })
}
// 取消CLE展商
export const uncleExhibitorIper = (ids, data) => {
    return request({
        url: `/iper/unexhibitor/${ids}`,
        data,
        method: 'post'
    })
}

// 发送IP方邮件
export const sendIperMail = (data) => {
    return request({
        url: `/iper/mail`,
        data,
        method: 'post'
    })
}